using UnityEngine;
using System.Collections;

public class InstantiateShapes : MonoBehaviour 
{
	public static InstantiateShapes Instance;
	public GameObject[] drawShapes;
	
	float zeroPos	= 0.0f;
	float oneSize	= 1.0f;
	
	GameObject currentShape;
	
	void Awake () 
	{
		Instance = this;
	}
	
	public void InstantiateShape ( int shapeIndex ) 
	{
//		currentShape = drawShapes[shapeIndex];
//		currentShape.layer = 10;
//		Instantiate(currentShape);
		
		currentShape = Instantiate(drawShapes[shapeIndex]) as GameObject;
		currentShape.transform.parent = transform;
		currentShape.layer = 10;
		currentShape.transform.localPosition = new Vector3 ( zeroPos, zeroPos, zeroPos);
		currentShape.transform.localScale = new Vector3 ( oneSize, oneSize, oneSize );
		
	}
	
	public void DestroyShape ()
	{
		Destroy(currentShape);
	}
}
